<template>
    <div class="content">
        <div>
            <span class="name">{{item.type | codeTo2}}</span>
            <span class="money" :class="color(item.direction)">{{item.amount,item.direction | todeTo3 }}</span>
        </div>
         <div>
            <span class="time">{{item.createTime}}</span>
            <span class="balance">余额 {{item.total |todeTo3	}}</span>
        </div>
    </div>
</template>
<script>
export default {
    props: {
        item: {}
    },
    methods: {
    	color(num){
	  		if(num==1){
	  			return "green"
	  		}
	  	},
       
    },
    filters:{
	    codeTo2(value){
	    	if (value=="1") {
	    		return "充值"
	    	}else if(value=="2"){
	    		return  "提现"
	    	} 
	    	else if(value=="3"){
	    		return "收入"
	    	}else if(value=="4"){
	    		return "支出"
	    	} else if(value=="5"){
	    		return "提现手续费"
	    	} else if(value=="6"){
	    		return "结算手续费"
	    	} else if(value=="7"){
	    		return "买入"
	    	} else if(value=="8"){
	    		return "提现冻结"
	    	} else if(value=="9"){
	    		return "提现解冻"
	    	} else if(value=="10"){
	    		return "冻结履约保证金"
	    	} else if(value=="11"){
	    		return "扣除综合管理费"
	    	} else if(value=="12"){
	    		return "递延费"
	    	} else if(value=="13"){
	    		return "冻结止盈保证金"
	    	} else if(value=="14"){
	    		return "解冻"
	    	} else if(value=="15"){
	    		return "收益"
	    	} else if(value=="16"){
	    		return "亏损"
	    	} else if(value=="17"){
	    		return "扣除未支付的递延费"
	    	} else if(value=="18"){
	    		return "销售佣金"
	    	} else if(value=="19"){
	    		return "收取综合管理费"
	    	} else if(value=="20"){
	    		return "补亏"
	    	} else if(value=="21"){
	    		return "手续费佣金"
	    	} else{
	    		return "盈利佣金"
	    	}
	     
	    },
	    todeTo3(v,c){
  		if(c==1){
  			return "-"+v.toFixed(2);
  		}else{
  			return v.toFixed(2);
  		}
  		
  	},
  	
  	}
  	
}
</script>

<style lang="less" scoped>
@import '../less/config.less';
.content {
    height: 1.41333333333rem;
    padding: 0.2rem @p30;
    font-size: @f32;
    display: flex;
    justify-content: center;
   	align-items: space-between;
    flex-direction: column;
    background-color: @liBg;
    border-top: 1px solid #262934;
    div {
        color: @fcolor;
        display: flex;
        justify-content: space-between;
        align-items: space-between;
        .name{
        	font-size: @f32;
        	color: white;
           
        }
        .money{
        	color: #ff335b;
        	font-size: @p30;
        }
         .green{
        	color: #33FFC3;
        	font-size: @p30;
        }
        .time,.balance{
        	font-size: @f24;
        	color: #56627C;
        }
       
    }
}
</style>
